package se.chalmers.tda366.crumble.utils;

public final class ImageStripper {
	
	public static String strip(String strIn) {
		String strOut = strIn;
		while(true)
		{
			int imgIndex = strIn.indexOf("<img");
			if(imgIndex < 0)
			{
				break;
			}
			strOut = strIn.substring(0, imgIndex);
			strOut = strOut.concat("[BILD]");
			strOut = strOut.concat(strIn.substring(strIn.indexOf(">", imgIndex+1)+1, strIn.length()));
			strIn = strOut;			
		}
		return strOut;
	}

}
